import { defineComponent, computed, openBlock, createElementBlock, normalizeStyle, createElementVNode, renderSlot, Fragment, toDisplayString } from "vue";
const _hoisted_1 = { class: "me-panel-header-inner" };
const _hoisted_2 = { class: "me-panel-header-left" };
const _hoisted_3 = { class: "me-panel-header-right" };
const _hoisted_4 = { class: "me-panel-header-right" };
const _hoisted_5 = { class: "me-panel-header-left" };
const _sfc_main = /* @__PURE__ */ defineComponent({
  ...{
    name: "me-panel-title"
  },
  __name: "panel-title",
  props: {
    title: {},
    reverse: { type: Boolean, default: false },
    background: {}
  },
  setup(__props) {
    const props = __props;
    const isColor = (color) => {
      return /^#|^rgba?|^radial-gradient|^linear-gradient/.test(color);
    };
    const currentStyle = computed(() => {
      const { background } = props;
      return background ? isColor(background) ? { background, borderColor: background } : { background: `url(${background})`, backgroundSize: "100% 100%" } : {};
    });
    return (_ctx, _cache) => {
      return openBlock(), createElementBlock("div", {
        class: "me-panel-header",
        style: normalizeStyle(currentStyle.value)
      }, [
        createElementVNode("div", _hoisted_1, [
          renderSlot(_ctx.$slots, "default", {}, () => [
            !_ctx.reverse ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
              createElementVNode("div", _hoisted_2, [
                renderSlot(_ctx.$slots, "title-icon"),
                createElementVNode("span", null, toDisplayString(_ctx.title), 1)
              ]),
              createElementVNode("div", _hoisted_3, [
                renderSlot(_ctx.$slots, "content")
              ])
            ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
              createElementVNode("div", _hoisted_4, [
                renderSlot(_ctx.$slots, "content")
              ]),
              createElementVNode("div", _hoisted_5, [
                renderSlot(_ctx.$slots, "title-icon"),
                createElementVNode("span", null, toDisplayString(_ctx.title), 1)
              ])
            ], 64))
          ])
        ])
      ], 4);
    };
  }
});
export {
  _sfc_main as default
};
//# sourceMappingURL=panel-title.vue2.mjs.map
